
public abstract class Algoritmo {
	protected double xn;
	protected double xn1;

	public Algoritmo(double x0) {
		
		xn=x0;
	}
	public double error(){
		double error;
		error=xn1-xn;
		if(error<0){
			error=error*-1;
		}
		return error;
	}
	public boolean cumple_criterio_corte(){
		if(this.error()<=0.00001){
			return true;
		}
		return false;
	}
	public abstract void iterar();
}
